<template>
	<view class="content">
		<template>
			<view class="content_box">
				<view class="content_box_item" v-for="(item,index) in dataList" :key='index' @click="$to(`/package/enroll/activity/detail?id=${item.pk_id}`)">
					<image :src="formatPictureImg(item.img)" mode="aspectFill" class="content_box_item_img"></image>
					<view class="content_box_item_right">
						<view class="content_box_item_title u-line-2 ">活动名称：{{item.name}}</view>
						<view class="content_box_item_title ">联系人：{{item.phone}}</view>
						<view class="">开始时间：{{item.start_date | timeFiter}}</view>
						<view class="">结束时间：{{item.end_date | timeFiter}}</view>
					</view>
					<view class="content_box_see" >
						<view class="iconfont iconfont-e775 "></view>
					</view>
				</view>
			</view>
			<sww-load-more :params="dataListParams"></sww-load-more>
			<sww-login />
		</template>

	</view>
</template>

<script>
	import {
		formatDate,
	} from '@/utils/moment/index.js'
	import {
		pagingMixin
	} from '@/mixins/sysPaging.js';
	export default {
		mixins: [pagingMixin],
		data() {
			return {

			}
		},

		onLoad(options) {
			this.initPage()
		},
		onReachBottom() {
			this._load_data();
		},
		filters: {
			timeFiter(time) {
				return formatDate(time, 'YYYY-MM-DD HH:mm')
			}
		},
		methods: {
			initPage() {
				this._init_data('adminGetEnrollInfoList', {
					mechanism_id: this.vuex_adminuser.enroll_id,
					business_id: this.vuex_business.pk_id,
				})
			},

		},

	}
</script>
<style lang="scss">
	page {
		background-color: $www-theme-bg;
	}
</style>
<style lang="scss" scoped>
	.content {

		margin-top: 30rpx;
		padding: 0 26rpx;

		.content_box {


			.content_box_item {
				display: flex;
				position: relative;
				padding: 20rpx;
				background-color: #ffffff;
				border-radius: 12rpx;
				margin-bottom: 20rpx;
				font-size: 26rpx;

				.content_box_item_right {
					flex: 1;
					display: flex;
					flex-direction: column;
					justify-content: space-between;
				}

				.content_box_see {
					position: absolute;
					right: 20rpx;
					top: 50%;
					transform: translateY(-50%);
					color: #999;
					font-size: 32rpx;
				}

				.content_box_item_img {
					width: 200rpx;
					height: 200rpx;
					border-radius: 10rpx;
					margin-right: 20rpx;
				}
			}
		}
	}
</style>
